package com.ruoyi.hazard.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.hazard.domain.HazardInfo;
import com.ruoyi.hazard.domain.dto.HazardInfoDto;
import com.ruoyi.hazard.domain.qo.HazardInfoPageQo;
import com.ruoyi.hazard.domain.qo.HazardInfoQo;
import com.ruoyi.hazard.domain.vo.HazardAlarmVo;
import com.ruoyi.hazard.domain.vo.HazardAmountAnalysisVo;
import com.ruoyi.hazard.domain.vo.HazardInfoVo;
import com.ruoyi.hazard.domain.vo.HazardStatisticsVo;

import java.io.InputStream;
import java.util.List;

/**
 * 隐患信息服务接口
 *
 * @author admin
 * @since 2025-07-23 10:50:03
 */
public interface HazardInfoService extends IService<HazardInfo> {

    LambdaQueryWrapper<HazardInfo> getQueryWrapper(HazardInfoQo qo);

    //IPage<HazardInfoVo> getPage(LambdaQueryWrapper<HazardInfo> qw, int pageNum, int pageSize);

    HazardInfoVo toVo(HazardInfo hazardInfo);
    HazardInfoVo toVo(HazardInfoDto hazardInfo);

    HazardInfo toEntity(HazardInfoVo vo);

    List<HazardStatisticsVo> getHazardTypeStatistics(Long deptId);

    List<HazardStatisticsVo> getHazardLevelStatistics(Long deptId);

    List<HazardAmountAnalysisVo> getHazardAmountAnalysis(Long deptId);

    HazardAlarmVo getHazardAlarm(Long deptId, Long deltaId);

    IPage<HazardInfoVo> getPage(HazardInfoPageQo qo);

    List<HazardInfoDto> getList(HazardInfoQo qo);

    /**
     * 导入数据
     * @param hazardInfoVos
     * @param updateSupport
     * @return
     */
    String importData(List<HazardInfoVo> hazardInfoVos, boolean updateSupport);

    void hazardAlarm();

    void updateSuperviseLevelToNull(HazardInfo hazardInfo);
}

